package 设计模式.设计原则.开闭原则;

public class Test {

    public static void main(String[] args) {
        JavaCourse javaCourse = new JavaDiscountCourse(1,"张三",200.0);
        JavaDiscountCourse q = (JavaDiscountCourse)javaCourse;
        System.out.println("序号为："+q.getId()+"  姓名："+q.getName()+" 价格："+q.getPrice()+",原价为："+q.getOriginPrice());
    }
}
